home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- NNNNAAAAMMMMEEEE
- SSSSCCCCFFFFFFFFTTTT2222DDDD, DDDDZZZZFFFFFFFFTTTT2222DDDD, CCCCSSSSFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD - Applies a two-dimensional real-to-
- complex or complex-to-real Fast Fourier Transform (FFT)
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- Single precision -> Single precision complex
-
- Fortran:
- CCCCAAAALLLLLLLL SSSSCCCCFFFFFFFFTTTT2222DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _y,,,, _l_d_y,,,, _t_a_b_l_e,,,,
- _w_o_r_k,,,, _i_s_y_s))))
-
- C/C++:
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ssssccccfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,, ffffllllooooaaaatttt *_x,,,,
- iiiinnnntttt _l_d_x,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _l_d_y,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,,
- iiiinnnntttt *_i_s_y_s))));;;;
-
- C++ STL:
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ssssccccfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,, ffffllllooooaaaatttt *_x,,,,
- iiiinnnntttt _l_d_x,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_y,,,, iiiinnnntttt _l_d_y,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,,
- iiiinnnntttt *_i_s_y_s))));;;;
-
- Double precision -> Double precision complex
-
- Fortran:
- CCCCAAAALLLLLLLL DDDDZZZZFFFFFFFFTTTT2222DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _y,,,, _l_d_y,,,, _t_a_b_l_e,,,,
- _w_o_r_k,,,, _i_s_y_s))))
-
- C/C++:
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ddddzzzzfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,, ddddoooouuuubbbblllleeee
- *_x,,,, iiiinnnntttt _l_d_x,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _l_d_y,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee
- *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- C++ STL:
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ddddzzzzfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,, ddddoooouuuubbbblllleeee
- *_x,,,, iiiinnnntttt _l_d_x,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_y,,,, iiiinnnntttt _l_d_y,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee
- *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- Single precision complex -> Single precision
-
- Fortran:
- CCCCAAAALLLLLLLL CCCCSSSSFFFFFFFFTTTT2222DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _y,,,, _l_d_y,,,, _t_a_b_l_e,,,,
- _w_o_r_k,,,, _i_s_y_s))))
-
- C/C++:
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccssssfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _l_d_x,,,, ffffllllooooaaaatttt *_y,,,, iiiinnnntttt _l_d_y,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,,
- ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- C++ STL:
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccssssfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
- ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_x,,,, iiiinnnntttt _l_d_x,,,, ffffllllooooaaaatttt *_y,,,, iiiinnnntttt _l_d_y,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,,
- ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- Double precision complex -> Double precision
-
- Fortran:
- CCCCAAAALLLLLLLL ZZZZDDDDFFFFFFFFTTTT2222DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _y,,,, _l_d_y,,,, _t_a_b_l_e,,,,
- _w_o_r_k,,,, _i_s_y_s))))
-
- C/C++:
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt zzzzddddfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
- ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _l_d_x,,,, ddddoooouuuubbbblllleeee *_y,,,, iiiinnnntttt _l_d_y,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,,
- ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- C++ STL:
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
- iiiinnnntttt zzzzzzzzfffffffftttt2222dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
- ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_x,,,, iiiinnnntttt _l_d_x,,,, ddddoooouuuubbbblllleeee *_y,,,, iiiinnnntttt _l_d_y,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,,
- ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
-
- IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- These routines are part of the SCSL Scientific Library and can be loaded
- using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option. The ----llllssssccccssss____mmmmpppp option
- directs the linker to use the multi-processor version of the library.
-
- When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
- 4 bytes (32 bits). Another version of SCSL is available in which integers
- are 8 bytes (64 bits). This version allows the user access to larger
- memory sizes and helps when porting legacy Cray codes. It can be loaded
- by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
- only one of the two versions; 4-byte integer and 8-byte integer library
- calls cannot be mixed.
-
- The C and C++ prototypes shown above are appropriate for the 4-byte
- integer version of SCSL. When using the 8-byte integer version, the
- variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____fffffffftttt____iiii8888....hhhh>>>> header
- file should be included.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- SSSSCCCCFFFFFFFFTTTT2222DDDD/DDDDZZZZFFFFFFFFTTTT2222DDDD computes the two-dimensional Fast Fourier Transform (FFT)
- of the real matrix _X, and it stores the results in the complex matrix _Y.
- CCCCSSSSFFFFFFFFTTTT2222DDDD/ZZZZDDDDFFFFFFFFTTTT2222DDDD computes the corresponding inverse transform.
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- In FFT applications, it is customary to use zero-based subscripts; the
- formulas are simpler that way. First the function of SSSSCCCCFFFFFFFFTTTT2222DDDD is
- described. Suppose the arrays are declared as follows:
-
- Fortran:
-
- REAL X(0:ldx-1, 0:n2-1)
- COMPLEX Y(0:ldy-1, 0:n2-1)
-
-
- C/C++:
-
- float x[n2][ldx];
- scsl_complex y[n2][ldy];
-
-
- C++ STL:
-
- float x[n2][ldx];
- complex<float> y[n2][ldy];
-
-
- where _l_d_x >= _n_1, _l_d_y >= (_n_1/2) + 1.
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD computes the formula:
-
- n2-1 n1-1
- Y(k1, k2) = scale * Sum Sum [ X(j1, j2)*w1**(j1*k1)*w2**(j2*k2) ]
- j2=0 j1=0
-
- for _k_1 = 0, ..., _n_1/2 + 1
- _k_2 = 0, ..., _n_2-1
-
-
- where:
-
- _w_1 = exp(_i_s_i_g_n*2*_p_i*_i/_n_1)
-
- _w_2 = exp(_i_s_i_g_n*2*_p_i*_i/_n_2)
-
- _i = + sqrt(-1)
-
- _p_i = 3.14159...,
-
- _i_s_i_g_n = +1 or -1
-
- Different authors use different conventions for which of the transforms,
- _i_s_i_g_n = +1 or _i_s_i_g_n = -1, is the forward or inverse transform, and what
- the _s_c_a_l_e factor should be in either case. You can make these routines
- compute any of the various possible definitions, however, by choosing the
- appropriate values for _i_s_i_g_n and _s_c_a_l_e.
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- The relevant fact from FFT theory is this: If you take the FFT with any
- particular values of _i_s_i_g_n and _s_c_a_l_e, the mathematical inverse function
- is computed by taking the FFT with -_i_s_i_g_n and 1/(_n_1 * _n_2 * _s_c_a_l_e). In
- particular, if you use _i_s_i_g_n = +1 and _s_c_a_l_e = 1.0 for the forward FFT,
- you can compute the inverse FFT by using _i_s_i_g_n = -1 and _s_c_a_l_e = 1.0/(_n_1 *
- _n_2).
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD is very similar in function to CCCCCCCCFFFFFFFFTTTT2222DDDD, but it takes the real-
- to-complex transform in the first dimension, followed by the
- complex-to-complex transform in the second dimension.
-
- CCCCSSSSFFFFFFFFTTTT2222DDDD does the reverse. It takes the complex-to-complex FFT in the
- second dimension, followed by the complex-to-real FFT in the first
- dimension.
-
- See the IIIINNNNTTTTRRRROOOO____FFFFFFFFTTTT(3S) man page for more information about real-to-complex
- and complex-to-real FFTs. The two-dimensional analog of the conjugate
- formula is as follows:
-
- _Y_k_1, _k_2 = conjg _Y n1 - k, _n_2 - _k_2
-
-
- for _n_1/2 < _k_1 <= _n_1 - 1
-
-
- 0 <= _k_2 <= _n_2 - 1
-
- where the notation conjg(_z) represents the complex conjugate of _z.
-
- Thus, you have to compute only (slightly more than) half of the output
- values, namely:
-
- _Y_k_1, _k_2 for 0 <= _k_1 <= _n_1/2 0 <= _k_2 <= _n_2 - 1
-
-
- See the NOTES section of this man page for information about the
- interpretation of the data types described in the following arguments.
-
- These routines have the following arguments:
-
- _i_s_i_g_n Integer. (input)
- Specifies whether to initialize the _t_a_b_l_e array or to do the
- forward or inverse Fourier transform, as follows:
-
- If _i_s_i_g_n = 0, the routine initializes the _t_a_b_l_e array and
- returns. In this case, the only arguments used or checked are
- _i_s_i_g_n, _n_1, _n_2, and _t_a_b_l_e.
-
- If _i_s_i_g_n = +1 or -1, the value of _i_s_i_g_n is the sign of the
- exponent used in the FFT formula.
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- _n_1 Integer. (input)
- Transform size in the first dimension. If _n_1 is not positive,
- the routine returns without calculating a transform.
-
- _n_2 Integer. (input)
- Transform size in the second dimension. If _n_2 is not positive,
- the routine returns without calculating a transform.
-
- _s_c_a_l_e Scale factor. (input)
- SSSSCCCCFFFFFFFFTTTT2222DDDD: Single precision.
- DDDDZZZZFFFFFFFFTTTT2222DDDD: Double precision.
- CCCCSSSSFFFFFFFFTTTT2222DDDD: Single precision.
- ZZZZDDDDFFFFFFFFTTTT2222DDDD: Double precision.
- Each element of the output array is multiplied by _s_c_a_l_e factor
- after taking the Fourier transform, as defined previously.
-
- _x Array of dimensions (_l_d_x, _n_2). (input)
- SSSSCCCCFFFFFFFFTTTT2222DDDD: Single precision array.
- DDDDZZZZFFFFFFFFTTTT2222DDDD: Double precision array.
- CCCCSSSSFFFFFFFFTTTT2222DDDD: Single precision complex array.
- ZZZZDDDDFFFFFFFFTTTT2222DDDD: Double precision complex array.
-
- Array of values to be transformed.
-
- _l_d_x Integer. (input)
-
- The number of rows in the _x array, as it was declared in the
- calling program. That is, the leading dimension of _x.
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD, DDDDZZZZFFFFFFFFTTTT2222DDDD: _l_d_x >= MMMMAAAAXXXX(_n_1, 1).
- CCCCSSSSFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD: _l_d_x >= MMMMAAAAXXXX(_n_1/2 + 1, 1).
-
- _y Array of dimension (_l_d_y, _n_2). (output)
- SSSSCCCCFFFFFFFFTTTT2222DDDD: Single precision complex array.
- DDDDZZZZFFFFFFFFTTTT2222DDDD: Double precision complex array.
- CCCCSSSSFFFFFFFFTTTT2222DDDD: Single precision array.
- ZZZZDDDDFFFFFFFFTTTT2222DDDD: Double precision array.
-
- Output array of transformed values. The output array can be
- the same as the input array, in which case, the transform is
- done in place and the input array is overwritten with the
- transformed values. In this case, it is necessary that the
- following equalities hold:
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD, DDDDZZZZFFFFFFFFTTTT2222DDDD: _l_d_x = 2 * _l_d_y.
- CCCCSSSSFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD: _l_d_y = 2 * _l_d_x.
-
- _l_d_y Integer. (input)
-
- The number of rows in the _y array, as it was declared in the
- calling program (the leading dimension of _y).
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD, DDDDZZZZFFFFFFFFTTTT2222DDDD: _l_d_y >= MMMMAAAAXXXX(_n_1/2 + 1, 1).
- CCCCSSSSFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD: _l_d_y >= MMMMAAAAXXXX(_n_1 + 2, 1).
-
- In the complex-to-real routine, two extra elements are in the
- first dimension (_l_d_y >= _n_1 + 2, rather than just _l_d_y >= _n_1).
- These elements are needed for intermediate storage during the
- computation. On exit, their value is undefined.
-
- _t_a_b_l_e Array of dimension (_n_1 + _N_F_R) + (2 * _n_2 + _N_F) (input or output)
- SSSSCCCCFFFFFFFFTTTT2222DDDD, CCCCSSSSFFFFFFFFTTTT2222DDDD: Single precision array
- DDDDZZZZFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD: Double precision array
-
- Table of factors and roots of unity. See the description of
- the _i_s_y_s argument for the value of _N_F and _N_F_R.
-
- If _i_s_i_g_n = 0, the routine initializes _t_a_b_l_e (_t_a_b_l_e is output
- only).
-
- If _i_s_i_g_n = +1 or -1, the values in _t_a_b_l_e are assumed to be
- initialized already by a prior call with _i_s_i_g_n = 0 (_t_a_b_l_e is
- input only).
-
- _w_o_r_k Array of dimension _n_1 + 4 * _n_2
- SSSSCCCCFFFFFFFFTTTT2222DDDD, CCCCSSSSFFFFFFFFTTTT2222DDDD: Single precision array
- DDDDZZZZFFFFFFFFTTTT2222DDDD, ZZZZDDDDFFFFFFFFTTTT2222DDDD: Double precision array
-
- Work array. This is a scratch array used for intermediate
- calculations. Its address space must be different from that of
- the input and output arrays.
-
- _i_s_y_s Integer array dimensioned 0000........_i_s_y_s((((0000)))).
- An array that gives implementation-specific information. All
- features and functions of the FFT routines specific to any
- particular implementation are confined to this _i_s_y_s array.
-
- In the Origin series implementation, _i_s_y_s((((0000))))====0000 and _i_s_y_s((((0000))))====1111
- are supported. In SCSL versions prior to 1.3, only _i_s_y_s((((0000))))====0000
- was allowed. For _i_s_y_s((((0000))))====0000, _N_F====33330000 and _N_F_R====11115555, and for
- _i_s_y_s((((0000))))====1111, _N_F====_N_F_R====222255556666. The _N_F(_R) words of storage in the _t_a_b_l_e
- array contain a factorization of the length of the transform.
-
- The smaller value of _N_F and _N_F_R for _i_s_y_s((((0000))))====0000 is historical.
- They are too small to store all the required factors for the
- highest performing FFT, so when _i_s_y_s((((0000))))====0000, extra space is
- allocated when the _t_a_b_l_e array is initialized. To avoid memory
- leaks, this extra space must be deallocated when the _t_a_b_l_e
- array is no longer needed. The SSSSCCCCFFFFFFFFTTTT2222DDDDFFFF routine is used to
- release this memory. Due to the potential for memory leaks, the
- use of _i_s_y_s((((0000))))====0000 should be avoided.
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- For _i_s_y_s((((0000))))====1111, the value of _N_F and _N_F_R are large enough so that
- no extra memory needs to be allocated, and there is no need to
- call SSSSCCCCFFFFFFFFTTTT2222DDDDFFFF to release memory. If called, it does nothing.
-
- NOTE: _i_s_y_s((((0000))))====1111 means that _i_s_y_s is an integer array with two
- elements. The second element, _i_s_y_s((((1111)))), will not be accessed.
-
- NNNNOOOOTTTTEEEESSSS
- The following data types are described in this documentation:
-
- TTTTeeeerrrrmmmm UUUUsssseeeedddd DDDDaaaattttaaaa ttttyyyyppppeeee
-
- Fortran:
-
- Array dimensioned 0000........_n----1111 xxxx((((0000::::nnnn----1111))))
-
- Array of dimensions (_m,_n) xxxx((((mmmm,,,,nnnn))))
-
- Array of dimensions (_m,_n,_p) xxxx((((mmmm,,,,nnnn,,,,pppp))))
-
- Integer IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
-
- Single precision RRRREEEEAAAALLLL
-
- Double precision DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
-
- Single precision complex CCCCOOOOMMMMPPPPLLLLEEEEXXXX
-
- Double precision complex DDDDOOOOUUUUBBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEEXXXX
-
- C/C++:
-
- Array dimensioned 0000........_n----1111 xxxx[[[[_n]]]]
-
- Array of dimensions (_m,_n) xxxx[[[[mmmm****nnnn]]]] oooorrrr xxxx[[[[nnnn]]]][[[[mmmm]]]]
-
- Array of dimensions (_m,_n,_p) xxxx[[[[mmmm****nnnn****pppp]]]] oooorrrr xxxx[[[[pppp]]]][[[[nnnn]]]][[[[mmmm]]]]
-
- Integer iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
-
- Single precision ffffllllooooaaaatttt
-
- Double precision ddddoooouuuubbbblllleeee
-
- Single precision complex ssssccccssssllll____ccccoooommmmpppplllleeeexxxx
-
- Double precision complex ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx
-
- C++ STL:
-
-
-
-
-
-
- PPPPaaaaggggeeee 7777
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- Array dimensioned 0000........_n----1111 xxxx[[[[_n]]]]
-
- Array of dimensions (_m,_n) xxxx[[[[mmmm****nnnn]]]] oooorrrr xxxx[[[[nnnn]]]][[[[mmmm]]]]
-
- Array of dimensions (_m,_n,_p) xxxx[[[[mmmm****nnnn****pppp]]]] oooorrrr xxxx[[[[pppp]]]][[[[nnnn]]]][[[[mmmm]]]]
-
- Integer iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
-
- Single precision ffffllllooooaaaatttt
-
- Double precision ddddoooouuuubbbblllleeee
-
- Single precision complex ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>>
-
- Double precision complex ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>>
-
- CCCCAAAAUUUUTTTTIIIIOOOONNNNSSSS
- Transform sizes with a prime factor exceeding 22223332222----1111 are not supported for
- the 8-byte integer version of the library.
-
- In addition to the _w_o_r_k array, the FFT routines also dynamically allocate
- scratch space from the stack. The amount of space allocated can be
- slightly bigger than the size of the largest processor cache. For single
- processor runs, the default stack size is large enough that these
- allocations generally cause no problems. But for parallel runs, you need
- to ensure that the stack size of slave threads is big enough to hold this
- scratch space. Failure to reserve sufficient stack space will cause
- programs to dump core due to stack overflows. The stack size of MP
- library slave threads is controlled via the MMMMPPPP____SSSSLLLLAAAAVVVVEEEE____SSSSTTTTAAAACCCCKKKKSSSSIIIIZZZZEEEE
- environment variable or the mmmmpppp____sssseeeetttt____ssssllllaaaavvvveeee____ssssttttaaaacccckkkkssssiiiizzzzeeee(((()))) library routine. See
- the mmmmpppp(3C), mmmmpppp(3F) and ppppeeee____eeeennnnvvvviiiirrrroooonnnn(5) reference pages for more information
- on controlling the slave stack size. For pthreads applications, the
- thread's stack size is specified as one of many creation attributes
- provided in the pthread_attr_t argument to pppptttthhhhrrrreeeeaaaadddd____ccccrrrreeeeaaaatttteeee(3P). The
- stacksize attribute should be set explicitly to a non-default value using
- the pppptttthhhhrrrreeeeaaaadddd____aaaattttttttrrrr____sssseeeettttssssttttaaaacccckkkkssssiiiizzzzeeee(3P) call, described in the
- pppptttthhhhrrrreeeeaaaadddd____aaaattttttttrrrr____iiiinnnniiiitttt(3P) man page.
-
- Care must be exercised if copies of the _t_a_b_l_e array are used: even though
- a copy exists, the original must persist. As an example, the following
- code will nnnnooootttt work:
-
- #include <scsl_fft.h>
- float x[256][129];
- scsl_complex y[256][65];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- int isys[2];
- isys[0] = 1;
- {
- float table_orig[(128 + 256) + (2*256 + 256)];
-
-
-
-
- PPPPaaaaggggeeee 8888
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- scfft2d(0, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table_orig, work, isys);
- bcopy(table_orig, table, ((128+256)+(2*256+256))*sizeof(float));
- }
- scfft2d(1, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table, work, isys);
-
-
- In this example, because _t_a_b_l_e__o_r_i_g is a stack variable that does not
- persist outside of the code block delimited by the braces, the data in
- the copy, _t_a_b_l_e, are not guaranteed to be valid. However, the following
- code will work because _t_a_b_l_e__o_r_i_g is persistent:
-
- #include <scsl_fft.h>
- float x[256][129];
- scsl_complex y[256][65];
- float table_orig[(128 + 256) + (2*256 + 256)];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- int isys[2];
- isys[0] = 1;
- scfft2d(0, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table_orig, work, isys);
- bcopy(table_orig, table, ((128+256)+(2*256+256))*sizeof(float));
- scfft2d(1, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table, work, isys);
-
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- The following examples are for Origin series only.
-
- Example 1: Initialize the TTTTAAAABBBBLLLLEEEE array in preparation for doing a two-
- dimensional FFT of size 128 by 256. In this case, only the _i_s_i_g_n, _n_1,
- _n_2, and _t_a_b_l_e arguments are used; you can use dummy arguments or zeros
- for other arguments.
-
- Fortran:
-
- REAL TABLE ((128 + 256) + (2*256 + 256))
- INTEGER ISYS(0:1)
- ISYS(0) = 1
- CALL SCFFT2D (0, 128, 256, 0.0, DUMMY, 1, DUMMY, 1,
- & TABLE, DUMMY, ISYS)
-
-
- Example 2: XXXX is an array dimensioned (0...128, 0...255), and YYYY is a
- complex array dimensioned (0...64, 0...255). The first 128 elements of
- each column of XXXX contain data; for performance reasons, the extra element
- forces the leading dimension to be an odd number. Take the
- two-dimensional FFT of XXXX and store it in YYYY. Initialize the TTTTAAAABBBBLLLLEEEE array,
- as in example 1.
-
-
-
-
- PPPPaaaaggggeeee 9999
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- Fortran:
-
- REAL X(0:128, 0:255)
- COMPLEX Y(0:64, 0:255)
- REAL TABLE ((128 + 256) + (2*256 + 256))
- REAL WORK(128 + 4*256)
- INTEGER ISYS(0:1)
- ISYS(0) = 1
- CALL SCFFT2D(0, 128, 256, 1.0, X, 129, Y, 65, TABLE, WORK, ISYS)
- CALL SCFFT2D(1, 128, 256, 1.0, X, 129, Y, 65, TABLE, WORK, ISYS)
-
-
- C/C++:
-
- #include <scsl_fft.h>
- float x[256][129];
- scsl_complex y[256][65];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- int isys[2];
- isys[0] = 1;
- scfft2d(0, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table, work, isys);
- scfft2d(1, 128, 256, 1.0f, (float *) x, 129,
- (scsl_complex *) y, 65, table, work, isys);
-
-
- C++ STL:
-
- #include <complex.h>
- #include <scsl_fft.h>
- float x[256][129];
- complex<float> y[256][65];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- int isys[2];
- isys[0] = 1;
- scfft2d(0, 128, 256, 1.0f, (float *) x, 129,
- (complex<float> *) y, 65, table, work, isys);
- scfft2d(1, 128, 256, 1.0f, (float *) x, 129,
- (complex<float> *) y, 65, table, work, isys);
-
-
- Example 3: Take the inverse FFT of YYYY and store it back in XXXX. Note that
- the leading dimension of _X must be increased to 2 * _l_d_y. The scale
- factor 1.0/(128.0*256.0) is used.
-
- Fortran:
-
- REAL X(0:129, 0:255)
- COMPLEX Y(0:64, 0:255)
- ...
-
-
-
- PPPPaaaaggggeeee 11110000
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- CALL CSFFT2D(-1, 128, 256, 1.0/(128.0*256.0), Y, 65,
- & X, 130, TABLE, WORK, ISYS)
-
-
- C/C++:
-
- float x[256][129];
- scsl_complex y[256][65];
- csfft2d(-1, 128, 256, 1.0f/(128.0f*256.0f), (scsl_complex *) y,
- 65, (float *) x, 130, table, work, isys);
-
-
- C++ STL:
-
- float x[256][129];
- complex<float> y[256][65];
- csfft2d(-1, 128, 256, 1.0f/(128.0f*256.0f), (complex<float> *) y,
- 65, (float *) x, 130, table, work, isys);
-
-
- Example 4: Perform the same computation as in example 2, but equivalence
- the input and output arrays to save storage space. In this case, a row
- must be added to X, because it is equivalenced to a complex array. Use
- the 8-byte integer version of SCSL.
-
- Fortran:
-
- REAL X(0:129, 0:255)
- COMPLEX Y(0:64, 0:255)
- EQUIVALENCE ( X(0, 0), Y(0, 0) )
- REAL TABLE ((128 + 256) + (2*256 + 256))
- REAL WORK(128 + 4*256)
- INTEGER*8 ISYS(0:1)
- ISYS(0) = 1_8
- CALL SCFFT2D(0_8, 128_8, 256_8, 1.0, X, 130_8,
- & Y, 65_8, TABLE, WORK, ISYS)
- CALL SCFFT2D(1_8, 128_8, 256_8, 1.0, X, 130_8,
- & Y, 65_8, TABLE, WORK, ISYS)
-
-
- C/C++:
-
- #include <scsl_fft_i8.h>
- float *x;
- scsl_complex y[256][65];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- long long isys[2];
- isys[0] = 1LL;
- x = (float *) &y[0][0];
- scfft2d(0LL, 128LL, 256LL, 1.0f, x, 130LL,
- (scsl_complex *) y, 65LL, table, work, isys);
-
-
-
- PPPPaaaaggggeeee 11111111
-
-
-
-
-
-
- SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))) SSSSCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS))))
-
-
-
- scfft2d(1LL, 128LL, 256LL, 1.0f, x, 130LL,
- (scsl_complex *) y, 65LL, table, work, isys);
-
-
- C++ STL:
-
- #include <complex.h>
- #include <scsl_fft.h>
- float *x;
- complex<float> y[256][65];
- float table[(128 + 256) + (2*256 + 256)];
- float work[128 + 4*256];
- long long isys[2];
- isys[0] = 1LL;
- x = (float *) &y[0][0];
- scfft2d(0LL, 128LL, 256LL, 1.0f, x, 130LL,
- (complex<float> *) y, 65LL, table, work, isys);
- scfft2d(1LL, 128LL, 256LL, 1.0f, x, 130LL,
- (complex<float> *) y, 65LL, table, work, isys);
-
-
- Example 5: Perform the same computation as in example 2, but assume that
- the lower bound of each Fortran array is 1, rather than 0. No change is
- needed in the subroutine calls.
-
- Fortran:
-
- REAL X(129, 256)
- COMPLEX Y(65, 256)
- CALL SCFFT2D(0, 128, 256, 1.0, X, 129, Y, 65, TABLE, WORK, ISYS)
- CALL SCFFT2D(1, 128, 256, 1.0, X, 129, Y, 65, TABLE, WORK, ISYS)
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- IIIINNNNTTTTRRRROOOO____FFFFFFFFTTTT(3S), IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), CCCCCCCCFFFFFFFFTTTT(3S), CCCCCCCCFFFFFFFFTTTT2222DDDD(3S), CCCCCCCCFFFFFFFFTTTT3333DDDD(3S),
- CCCCCCCCFFFFFFFFTTTTMMMM(3S), SSSSCCCCFFFFFFFFTTTT(3S), SSSSCCCCFFFFFFFFTTTT3333DDDD(3S), SSSSCCCCFFFFFFFFTTTTMMMM(3S)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11112222
-
-
-
-
-
-
-